const { exec } = require('./db')
const Koa = require('koa')
const app = new Koa()

const fn = async function() {
  const user = await exec();
  // const posts = await fetchPosts(user.id);
  return { user };
};


app.use(async (ctx, next) => {
  const data = await exec()
  ctx.body = data;
})

app.listen(3535, () => console.log(3535))


